<!-- 提现账户列表 -->
<template>
	<view class="p30 plr30">
		<view class="" v-if="isobjList">
			<view style="margin-bottom: 20px;font-size: 20px;font-weight: 700;">你现拥有的月卡套餐：</view>
			<view class="classto">
				<view class="mbg">套餐名称：{{objList.mealName}}</view>
				<view class="mbg">套餐天数：{{objList.days}}天</view>
				<view class="mbg">可用次数：{{objList.nums===-1 ? '无限': objList.nums}}次</view>
				<view class="mbg">总次数：{{objList.totalNums===-1 ? '无限': objList.totalNums}}次</view>
				<view class="mbg">套餐开始时间：{{objList.ctime}}</view>
				<view class="mbg">套餐有效期：{{objList.validTime}}</view>
			</view>
		</view>
		<view v-if="!isobjList" class=" flex_aj column ptb20">
			<view class="c9 pt20">您还没有购买任何月卡套餐</view>
		</view>
	</view>
</template>

<script>
	import {
		userMealGetMyMeal
	} from '@/api/user.js'
	export default {
		data() {
			return {
				objList: {},
				isobjList: false,
			};
		},
		async onShow() {
			this.agentId = wx.getStorageSync('agentId') || ''
			this.init()

		},
		methods: {
			async init() {
				const res = await userMealGetMyMeal({
					agentId: this.agentId
				})
				this.objList = res.data || {}
				this.isobjList = JSON.stringify(this.objList) == "{}" ? false : true
			},
		}
	};
</script>

<style scoped lang="scss">
	.classto {
		padding: 20px;
		background-color: #eee;
		border-radius: 30upx;
		box-shadow: 3upx 4upx 3upx 3upx #d4eeff;
		text-align: center;
	}

	.mbg {
		margin-bottom: 10px;
		font-size: 16px;
	}
</style>